class plug {
    constructor() {

    }
    getName() {
        return "iphone 充电头"
    }
}

class Target {
    constructor() {
        this.plug = new plug()
    }
    getName() {
        return this.plug.getName() + " 适配器Type-c充电头"
    }
}

let target = new Target()
target.getName()